/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.struts2.json.annotations.JSON;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "news_clientinfo")
//@NamedQueries({@NamedQuery(name = "NewsClientinfo.findAll", query = "SELECT n FROM NewsClientinfo n"), @NamedQuery(name = "NewsClientinfo.findByClientid", query = "SELECT n FROM NewsClientinfo n WHERE n.clientid = :clientid"), @NamedQuery(name = "NewsClientinfo.findByMobile", query = "SELECT n FROM NewsClientinfo n WHERE n.mobile = :mobile"), @NamedQuery(name = "NewsClientinfo.findByCatlogversion", query = "SELECT n FROM NewsClientinfo n WHERE n.catlogversion = :catlogversion"), @NamedQuery(name = "NewsClientinfo.findByCreatetime", query = "SELECT n FROM NewsClientinfo n WHERE n.createtime = :createtime"), @NamedQuery(name = "NewsClientinfo.findByLastupdate", query = "SELECT n FROM NewsClientinfo n WHERE n.lastupdate = :lastupdate"), @NamedQuery(name = "NewsClientinfo.findByMobilemidp", query = "SELECT n FROM NewsClientinfo n WHERE n.mobilemidp = :mobilemidp"), @NamedQuery(name = "NewsClientinfo.findByMwidth", query = "SELECT n FROM NewsClientinfo n WHERE n.mwidth = :mwidth"), @NamedQuery(name = "NewsClientinfo.findByMheight", query = "SELECT n FROM NewsClientinfo n WHERE n.mheight = :mheight"), @NamedQuery(name = "NewsClientinfo.findByMagent", query = "SELECT n FROM NewsClientinfo n WHERE n.magent = :magent"), @NamedQuery(name = "NewsClientinfo.findByMpaltform", query = "SELECT n FROM NewsClientinfo n WHERE n.mpaltform = :mpaltform"), @NamedQuery(name = "NewsClientinfo.findByMserialnum", query = "SELECT n FROM NewsClientinfo n WHERE n.mserialnum = :mserialnum"), @NamedQuery(name = "NewsClientinfo.findByMlocale", query = "SELECT n FROM NewsClientinfo n WHERE n.mlocale = :mlocale"), @NamedQuery(name = "NewsClientinfo.findByMcontenttypes", query = "SELECT n FROM NewsClientinfo n WHERE n.mcontenttypes = :mcontenttypes"), @NamedQuery(name = "NewsClientinfo.findByMencoding", query = "SELECT n FROM NewsClientinfo n WHERE n.mencoding = :mencoding"), @NamedQuery(name = "NewsClientinfo.findBySoftupdate", query = "SELECT n FROM NewsClientinfo n WHERE n.softupdate = :softupdate")})
public class NewsClientinfo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "clientid")
    private Integer clientid;
    @Column(name = "mobile")
    private String mobile;
    @Column(name = "catlogversion")
    private Integer catlogversion;
    @Column(name = "createtime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createtime;
    @Column(name = "lastupdate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastupdate;
    @Column(name = "softversion")
    private String area;
    @Column(name = "mobilemidp")
    private String mobilemidp;
    @Column(name = "mwidth")
    private Integer mwidth;
    @Column(name = "mheight")
    private Integer mheight;
    @Column(name = "magent")
    private String magent;
    @Column(name = "mpaltform")
    private String mpaltform;
    @Column(name = "mserialnum")
    private String mserialnum;
    @Column(name = "mlocale")
    private String mlocale;
    @Column(name = "mcontenttypes")
    private String mcontenttypes;
    @Column(name = "mencoding")
    private String mencoding;
    @Column(name = "softupdate")
    private Integer softupdate;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "newsClientinfo")
    private Set<NewsUserorder> newsUserorderSet;

    public NewsClientinfo() {
    }

    public NewsClientinfo(Integer clientid) {
        this.clientid = clientid;
    }

    public Integer getClientid() {
        return clientid;
    }

    public void setClientid(Integer clientid) {
        this.clientid = clientid;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Integer getCatlogversion() {
        return catlogversion;
    }

    public void setCatlogversion(Integer catlogversion) {
        this.catlogversion = catlogversion;
    }

    @JSON(format="yyyy-MM-dd HH:mm:ss")
    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getLastupdate() {
        return lastupdate;
    }

    public void setLastupdate(Date lastupdate) {
        this.lastupdate = lastupdate;
    }

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getMobilemidp() {
        return mobilemidp;
    }

    public void setMobilemidp(String mobilemidp) {
        this.mobilemidp = mobilemidp;
    }

    public Integer getMwidth() {
        return mwidth;
    }

    public void setMwidth(Integer mwidth) {
        this.mwidth = mwidth;
    }

    public Integer getMheight() {
        return mheight;
    }

    public void setMheight(Integer mheight) {
        this.mheight = mheight;
    }

    public String getMagent() {
        return magent;
    }

    public void setMagent(String magent) {
        this.magent = magent;
    }

    public String getMpaltform() {
        return mpaltform;
    }

    public void setMpaltform(String mpaltform) {
        this.mpaltform = mpaltform;
    }

    public String getMserialnum() {
        return mserialnum;
    }

    public void setMserialnum(String mserialnum) {
        this.mserialnum = mserialnum;
    }

    public String getMlocale() {
        return mlocale;
    }

    public void setMlocale(String mlocale) {
        this.mlocale = mlocale;
    }

    public String getMcontenttypes() {
        return mcontenttypes;
    }

    public void setMcontenttypes(String mcontenttypes) {
        this.mcontenttypes = mcontenttypes;
    }

    public String getMencoding() {
        return mencoding;
    }

    public void setMencoding(String mencoding) {
        this.mencoding = mencoding;
    }

    public Integer getSoftupdate() {
        return softupdate;
    }

    public void setSoftupdate(Integer softupdate) {
        this.softupdate = softupdate;
    }
    
  	@JSON(serialize=false)   
    public Set<NewsUserorder> getNewsUserorderSet() {
        return newsUserorderSet;
    }

    public void setNewsUserorderSet(Set<NewsUserorder> newsUserorderSet) {
        this.newsUserorderSet = newsUserorderSet;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (clientid != null ? clientid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsClientinfo)) {
            return false;
        }
        NewsClientinfo other = (NewsClientinfo) object;
        if ((this.clientid == null && other.clientid != null) || (this.clientid != null && !this.clientid.equals(other.clientid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsClientinfo[clientid=" + clientid + "]";
    }

}
